package com.jsg.sl651.entity.frame.body.returns;

import com.jsg.sl651.entity.frame.body.MessageBody;

public abstract class ReturnMessageBody extends MessageBody {

    /**
     * @param bytes
     * @return
     * @throws Exception
     */
    @Override
    public MessageBody decodeHex(byte[] bytes) throws Exception {
        throw new Exception("主动请求的请求体不支持HEX编码");
    }

    /**
     * @param bytes
     * @return
     * @throws Exception
     */
    @Override
    public MessageBody decodeAscii(byte[] bytes) throws Exception {
        throw new Exception("主动请求的请求体不支持ASCII编码");
    }


    @Override
    public int getFunctionCode() {
        throw new RuntimeException("响应消息体，不固定功能嘛，功能码跟着请求信息");
    }

}
